/*
 * RscUI.java
 * Created on 1/06/2009, 11:57:38 PM
 */

package CRM_UI;

import java.awt.Cursor;

/**
 *
 * @author L¡z
 */
public class RSC_UI extends javax.swing.JFrame
{
    Cursor handCursor = new Cursor(Cursor.HAND_CURSOR);
    Cursor defaultCursor = new Cursor(Cursor.DEFAULT_CURSOR);
    String login= " ";
    LoginUI cambiarPerfil;

    /** Creates new form RscUI */
    public RSC_UI(String login,LoginUI cambiarPerfil)
    {
        initComponents();
        this.login = login;
        setLocationRelativeTo(null);
        this.cambiarPerfil=cambiarPerfil;
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        titleLabel = new javax.swing.JLabel();
        clienteLabel = new javax.swing.JLabel();
        CSCLabel = new javax.swing.JLabel();
        clientesImgLabel = new javax.swing.JLabel();
        accionesLabel = new javax.swing.JLabel();
        accionesImgLabel = new javax.swing.JLabel();
        CSCImgLabel = new javax.swing.JLabel();
        reportesLabel = new javax.swing.JLabel();
        passwordLabel = new javax.swing.JLabel();
        passwordImgLabel = new javax.swing.JLabel();
        reportesImgLabel = new javax.swing.JLabel();
        botonPerfil = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Representante de Servicio al Cliente");

        titleLabel.setFont(new java.awt.Font("Berlin Sans FB", 0, 18));
        titleLabel.setText("Representante de Servicio al Cliente");

        clienteLabel.setText("Clientes");
        clienteLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                clienteLabelMouseClicked(evt);
            }
        });

        CSCLabel.setText("Casos de Servicio al Cliente");
        CSCLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CSCLabelMouseClicked(evt);
            }
        });

        clientesImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/cliente.png"))); // NOI18N
        clientesImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                clientesImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                clientesImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                clientesImgLabelMouseExited(evt);
            }
        });

        accionesLabel.setText("Acciones");
        accionesLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                accionesLabelMouseClicked(evt);
            }
        });

        accionesImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/acciones.png"))); // NOI18N
        accionesImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                accionesImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                accionesImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                accionesImgLabelMouseExited(evt);
            }
        });

        CSCImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/csc.png"))); // NOI18N
        CSCImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CSCImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                CSCImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                CSCImgLabelMouseExited(evt);
            }
        });

        reportesLabel.setText("Reportes");
        reportesLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                reportesLabelMouseClicked(evt);
            }
        });

        passwordLabel.setText("Contraseña");
        passwordLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                passwordLabelMouseClicked(evt);
            }
        });

        passwordImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Lock.png"))); // NOI18N
        passwordImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                passwordImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                passwordImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                passwordImgLabelMouseExited(evt);
            }
        });

        reportesImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/WOA_CandyBar Toolbar - Documents.png"))); // NOI18N
        reportesImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                reportesImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                reportesImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                reportesImgLabelMouseExited(evt);
            }
        });

        botonPerfil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/cambiarPerfil.png"))); // NOI18N
        botonPerfil.setToolTipText("Permite al usuario cambiar de perfil");
        botonPerfil.setFocusPainted(false);
        botonPerfil.setRequestFocusEnabled(false);
        botonPerfil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonPerfilActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(49, 49, 49)
                        .addComponent(clienteLabel))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(38, 38, 38)
                        .addComponent(clientesImgLabel)))
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(72, 72, 72)
                        .addComponent(CSCImgLabel))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addComponent(CSCLabel)))
                .addGap(36, 36, 36)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(accionesImgLabel)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(accionesLabel)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(104, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(reportesImgLabel)
                    .addComponent(reportesLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(passwordLabel)
                    .addComponent(passwordImgLabel))
                .addGap(116, 116, 116))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(botonPerfil, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(48, 48, 48)
                .addComponent(titleLabel)
                .addContainerGap(107, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(botonPerfil)
                    .addComponent(titleLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(clientesImgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(7, 7, 7)
                                .addComponent(CSCImgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(8, 8, 8)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(CSCLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(clienteLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addComponent(accionesImgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(accionesLabel)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(reportesImgLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(reportesLabel))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(passwordImgLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(passwordLabel)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        getAccessibleContext().setAccessibleName("Clientes");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void clientesImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clientesImgLabelMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        GestionarClienteUI cliente = new GestionarClienteUI(this);
        cliente.setVisible(true);
    }//GEN-LAST:event_clientesImgLabelMouseClicked

    private void clienteLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clienteLabelMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        GestionarClienteUI cliente = new GestionarClienteUI(this);
        cliente.setVisible(true);        
    }//GEN-LAST:event_clienteLabelMouseClicked

    private void CSCImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CSCImgLabelMouseClicked
        // TODO add your handling code here:
        //this.setVisible(false);
        GestionarCSC_UI csc = new GestionarCSC_UI();
        csc.setVisible(true);
    }//GEN-LAST:event_CSCImgLabelMouseClicked

    private void CSCLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CSCLabelMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        GestionarCSC_UI objGestionarCSC_UI = new GestionarCSC_UI();
        objGestionarCSC_UI.setVisible(true);
    }//GEN-LAST:event_CSCLabelMouseClicked

    private void accionesImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionesImgLabelMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        GestionarAccionesUI objGestionarAccionesUI = new GestionarAccionesUI(this);
        objGestionarAccionesUI.setVisible(true);
    }//GEN-LAST:event_accionesImgLabelMouseClicked

    private void accionesLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionesLabelMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        GestionarAccionesUI objGestionarAccionesUI = new GestionarAccionesUI(this);
        objGestionarAccionesUI.setVisible(true);
    }//GEN-LAST:event_accionesLabelMouseClicked

    private void reportesImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesImgLabelMouseClicked
        // TODO add your handling code here:
        ReportesRSC_UI objReportes = new ReportesRSC_UI(login);
        objReportes.setVisible(true);
    }//GEN-LAST:event_reportesImgLabelMouseClicked

    private void reportesLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesLabelMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_reportesLabelMouseClicked

    private void passwordImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_passwordImgLabelMouseClicked
        // TODO add your handling code here:
        ContraseNaUI password = new ContraseNaUI(login, this);
        password.setVisible(true);
    }//GEN-LAST:event_passwordImgLabelMouseClicked

    private void passwordLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_passwordLabelMouseClicked
        // TODO add your handling code here:
        ContraseNaUI password = new ContraseNaUI(login, this);
        password.setVisible(true);
    }//GEN-LAST:event_passwordLabelMouseClicked

    private void clientesImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clientesImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_clientesImgLabelMouseEntered

    private void clientesImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clientesImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_clientesImgLabelMouseExited

    private void CSCImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CSCImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_CSCImgLabelMouseEntered

    private void CSCImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CSCImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_CSCImgLabelMouseExited

    private void accionesImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionesImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_accionesImgLabelMouseEntered

    private void accionesImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionesImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_accionesImgLabelMouseExited

    private void reportesImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_reportesImgLabelMouseEntered

    private void reportesImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_reportesImgLabelMouseExited

    private void passwordImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_passwordImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_passwordImgLabelMouseEntered

    private void passwordImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_passwordImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_passwordImgLabelMouseExited

    private void botonPerfilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonPerfilActionPerformed
        // TODO add your handling code here:
        this.dispose();
        cambiarPerfil.limpiarCampos();
        cambiarPerfil.setVisible(true);
    }//GEN-LAST:event_botonPerfilActionPerformed


    /**
    * @param args the command line arguments
    */
 /*
    public static void main(String args[])
    {
                /*try {
            // Set System L&F
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        }
        catch (UnsupportedLookAndFeelException e)
        {
           // handle exception
        }
        catch (ClassNotFoundException e)
        {
           // handle exception
        }
        catch (InstantiationException e)
        {
           // handle exception
        }
        catch (IllegalAccessException e)
        {
           // handle exception
        }


        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new RSC_UI("").setVisible(true);
            }
        });
    } */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel CSCImgLabel;
    private javax.swing.JLabel CSCLabel;
    private javax.swing.JLabel accionesImgLabel;
    private javax.swing.JLabel accionesLabel;
    private javax.swing.JButton botonPerfil;
    private javax.swing.JLabel clienteLabel;
    private javax.swing.JLabel clientesImgLabel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel passwordImgLabel;
    private javax.swing.JLabel passwordLabel;
    private javax.swing.JLabel reportesImgLabel;
    private javax.swing.JLabel reportesLabel;
    private javax.swing.JLabel titleLabel;
    // End of variables declaration//GEN-END:variables

}
